/**
 * Copyright 2021 Solomon. All rights reserved.
 * Date : 2021.03.24
 */

#define HCMD_ADDRESS  0x0008
#define RHDP_ADDRESS  0x0040
#define HQARG_ADDRESS 0x0010

#define FLASH_W_SIZE 64
#define FLASH_R_SIZE 64

uint8_t SPD2010_SE_GAMMA_LL_WAIT_HCMD_CLR(void);
uint8_t SPD2010_SE_GAMMA_LL_WEN(void);
uint8_t SPD2010_SE_GAMMA_LL_WRSR(void);
uint8_t SPD2010_SE_GAMMA_LL_RDSR(void);
uint8_t SPD2010_SE_GAMMA_LL_ERASE_MACRO(void);
uint8_t SPD2010_SE_GAMMA_LL_PROGRAM_PAGE(uint32_t addr, uint32_t wlen, uint8_t *fw_data);
uint8_t SPD2010_SE_GAMMA_LL_READ_DATA(uint32_t addr, uint32_t rlen, uint8_t *rbuf);
uint8_t SPD2010_SE_GAMMA_SL_PROGRAM_PAGE(uint32_t addr, uint32_t wlen, uint8_t *fw_data);
uint8_t SPD2010_SE_GAMMA_SL_READ_DATA(uint32_t addr, uint32_t rlen, uint8_t *rbuf);
uint8_t SPD2010_RDID(void);
uint8_t SPD2010_FW_Update_Init(void);
uint8_t SPD2010_Flash_Erase(void);
uint8_t SPD2010_BIOS_Write_FW(uint8_t part_idx);
uint8_t SPD2010_BIOS_Read_FW(uint8_t part_idx);
uint8_t SPD2010_Download_FW(uint8_t part_idx);
uint8_t SPD2010_Verify_FW(uint8_t part_idx);
uint8_t SPD2010_FW_Update(void);
